package QuestionNum_17_1;

import java.math.BigInteger;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        function_1();

        BigInteger[] bigArr = new BigInteger[110];
        bigArr[0] = new BigInteger("1");
        bigArr[1] = new BigInteger("1");

        for (int i = 2; i < 100; i++) {
            bigArr[i] = bigArr[i - 1].add(bigArr[i - 2]);
        }
        System.out.println("第100个月兔子的个数是：" + bigArr[99].toString());
//        Scanner sc = new Scanner(System.in);
//        System.out.println("请输入你想知道的第几个月的兔子数:");
//        int num = sc.nextInt();
//        BigInteger month = new BigInteger("1");
//        month = computeCount(num);
//        System.out.println("第"+num+"个月有"+month+"对兔子");

    }


    public static void function_1(){
         int[] arr = new int[12];
         arr[0] = 1;            //第一个月兔子数  
         arr[1] = 1;
                     //利用循环做  
         for(int i=2;i<arr.length; i++) {
            arr[i] = arr[i-1] + arr[i-2];
     }
        System.out.println("一年的兔子数（即第12个月）的兔子数为："+arr[arr.length-1]);
    }
}
